<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="/static/js/jquery.min.js"></script>
</head>
<body>

</body>
<script>
    $(function (){
        zzsc();
        function zzsc(){
            $.get("",{},function (res) {
                var data =  JSON.parse(res)
                var sid = data.sid;
                var urls ="https://mbti.guoxuejianyi.com/cp68admin.php/exam.select/index?subject_id="+sid+"&page=1&limit=10";
                console.log(urls)

                $.ajax({
                    beforeSend: function (xhr) {
                        xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
                    },
                    url:urls,
                    type:"get",
                    dataType:"json",
                    success:function (re){
                        var da1 = re.data[0].select_title;
                        var type1= re.data[0].select_type;
                        var da2 = re.data[1].select_title;
                        var type2= re.data[1].select_type;
                        $.post("posttj",{"sid":sid,"da1":da1,"da2":da2,"type1":type1,"type2":type2},function (res){
                            if(res == 1){
                                zzsc();
                            }
                        })
                    }
                })
            })
        }
    })
</script>
</html>